﻿package pk;


public static void main(String[] args) throws IOException {
	Reader reader = new InputStreamReader(new FileInputStream(new File("e:/666.txt")),"UTF-8");
	Writer writer = new OutputStreamWriter(new FileOutputStream(new File("e:/999.txt")),"UTF-8");
	char[] buffer = new char[1024];
	int len = 0;
	while((len=reader.read(buffer))!= -1){
	System.out.println(new String(buffer,0,len));
	writer.write(buffer, 0, len);
	}
	writer.flush();
	writer.close();
	}